<template>
  <div>
    <div class="content">
      <!--跌倒/坠床后生命体征-->
      <div style="width: 100%">
        <div class="bname" ref="block0">跌倒/坠床后生命体征</div>
        <!--        <div style="color:red;margin-top: 1%;font-size: 14px">新的、严重的药品ADR应当在15日内报告，其中导致死亡的须立即报告；其他药品ADR应当在30日内报告。</div>-->
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="basicform" :model="basicForm"  label-width="140px">
            <el-form-item label="T(体温)" style="width: 620px" prop="bedTemperature">
              <div style="display: flex">
                <el-input v-model="basicForm.bedTemperature" :readonly="true"></el-input>
                <span style="margin-left:10px; float:right;font-weight:bolder;width: 110px">℃(35.0℃~42.0℃)</span>
              </div>
            </el-form-item>
            <el-form-item label="P(脉搏)" style="width: 600px" prop="bedPulse">
              <div style="display: flex">
                <el-input v-model="basicForm.bedPulse" :readonly="true"></el-input>
                <span style="margin-left:10px; float:right;font-weight:bolder;width: 110px">次/分</span>
              </div>
            </el-form-item>
            <el-form-item label="R(呼吸)" style="width: 600px" prop="bedBreathe">
              <div style="display: flex">
                <el-input v-model="basicForm.bedBreathe" :readonly="true"></el-input>
                <span style="margin-left:10px; float:right;font-weight:bolder;width: 110px">次/分</span>
              </div>
            </el-form-item>
            <el-form-item label="BP(血压)" style="width: 900px" prop="bedBloodPressure">
              <div style="display: flex">
                <el-input v-model="basicForm.bedBloodPressure" :readonly="true"></el-input>
                <span style="margin-left:10px; float:right;font-weight:bolder; width: 800px ">mmHg(请分别输入高低压用“/”隔开/.如 120/90)</span>
              </div>
            </el-form-item>
            <el-form-item label="意识状态" prop="bedConsciousnessState">
              <el-radio-group v-model="basicForm.bedConsciousnessState" onclick="return false"  >
                <el-radio label="01">清醒</el-radio>
                <el-radio label="02">嗜睡</el-radio>
                <el-radio label="03">昏睡</el-radio>
                <el-radio label="04">浅昏迷</el-radio>
                <el-radio label="05">中昏迷</el-radio>
                <el-radio label="06">深昏迷</el-radio>
                <el-radio label="07">烦躁</el-radio>
                <el-radio label="08">焦虑</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-form>
        </div>
      </div>

      <!--跌倒/坠床其他情况-->
      <div style="width: 100%">
        <div class="bname" ref="block2" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">跌倒/坠床其他情况
        </div>
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="basicForm" :model="basicForm" label-width="140px" >
            <div style="color:blue;margin-top: 1%;font-size: 14px">跌倒/坠床时情形：
            </div>
            <el-form-item label="跌倒/坠床时位置" prop="bedDropLocation">
              <el-radio-group v-model="basicForm.bedDropLocation" onclick="return false" >
                <el-radio label="01">床边</el-radio>
                <el-radio label="02">病室内</el-radio>
                <el-radio label="03">卫生间</el-radio>
                <el-radio label="04">楼道</el-radio>
                <el-radio label="05">院外</el-radio>
                <el-radio label="06">其他</el-radio>
              </el-radio-group>
            </el-form-item>
<!--            <div v-show="basicForm.bedDropLocation== '其他'">-->
<!--              <el-form-item label="其他" style="width: 600px">-->
<!--                <el-input  v-model="basicForm.bedDropLocation"></el-input>-->
<!--              </el-form-item>-->
<!--            </div>-->
            <el-form-item label="跌倒/坠床前患者活动能力" prop="bedMobility">
              <el-radio-group v-model="basicForm.bedMobility" onclick="return false"  >
                <el-radio label="01">活动自如</el-radio>
                <el-radio label="02">卧床不起</el-radio>
                <el-radio label="03">需要手杖辅具</el-radio>
                <el-radio label="04">需要轮椅辅具</el-radio>
                <el-radio label="05">需要助行器辅具</el-radio>
                <el-radio label="06">需要假肢辅具</el-radio>
              </el-radio-group>
            </el-form-item>

            <el-form-item label="治疗情况" prop="bedTreatmentConditions">
              <el-checkbox-group v-model="checkList"  onclick="return false">
                <el-checkbox label="01">无治疗</el-checkbox>
                <el-checkbox label="02">禁食</el-checkbox>
                <el-checkbox label="03">输液</el-checkbox>
                <el-checkbox label="04">引流管</el-checkbox>
                <el-checkbox label="05">灌肠后</el-checkbox>
              </el-checkbox-group>
            </el-form-item>
            <el-form-item label="家属及陪护" prop="bedFamilyEscorts" >
              <el-radio-group v-model="basicForm.bedFamilyEscorts" onclick="return false" >
                <el-radio label="01">家属陪护</el-radio>
                <el-radio label="02">职业陪护</el-radio>
                <el-radio label="03">无陪护</el-radio>
              </el-radio-group>
            </el-form-item>
<!--            <div v-show="basicForm.bedFamilyEscorts== '家属陪护'">-->
<!--              <el-form-item label="其他" style="width: 600px">-->
<!--                <el-input  v-model="basicForm.bedFamilyEscorts"></el-input>-->
<!--              </el-form-item>-->
<!--            </div>-->
<!--            <div v-show="basicForm.bedFamilyEscorts== '职业陪护'">-->
<!--              <el-form-item label="其他" style="width: 600px">-->
<!--                <el-input  v-model="basicForm.bedFamilyEscorts"></el-input>-->
<!--              </el-form-item>-->
<!--            </div>-->
            <el-form-item label="跌倒/坠床前发生于何项活动过程" prop="bedActivityProcess">
              <el-radio-group v-model="basicForm.bedActivityProcess" onclick="return false" >
                <el-radio label="01">躺卧病床</el-radio>
                <el-radio label="02">上下病床</el-radio>
                <el-radio label="03">坐床旁椅</el-radio>
                <el-radio label="04">如厕</el-radio>
                <el-radio label="05">沐浴时</el-radio>
                <el-radio label="06">站立</el-radio>
                <el-radio label="07">行走时</el-radio>
                <el-radio label="08">上下平车</el-radio>
                <el-radio label="09">坐轮椅</el-radio>
                <el-radio label="10">上下诊床</el-radio>
                <el-radio label="11">使用电梯时</el-radio>
                <el-radio label="12">从事康复活动时</el-radio>
                <el-radio label="13">其他</el-radio>
              </el-radio-group>
            </el-form-item>
            <div v-show="basicForm.bedActivityProcess== '其他'">
              <el-form-item label="其他" style="width: 600px" prop="bedActivityProcess">
                <el-input  v-model="basicForm.bedActivityProcess" onclick="return false" ></el-input>
              </el-form-item>
            </div>
            <div style="color:blue;margin-top: 1%;font-size: 14px">跌倒/坠床危险因素：
            </div>
            <el-form-item label="既往史" prop="bedAnamnesis" style="width: 600px">
              <el-input readonly placeholder="多个既往史用逗号隔开" v-model="basicForm.bedAnamnesis"></el-input>
              <!--                <el-select v-model="basicForm.bedAnamnesis" multiple placeholder="请选择" filterable>-->
              <!--                  <el-option-->
              <!--                    v-for="item in dict.type.he_anamnesis"-->
              <!--                    :key="item.value"-->
              <!--                    :label="item.label"-->
              <!--                    :value="item.value"-->
              <!--                  >-->
              <!--                  </el-option>-->
              <!--                </el-select>-->
            </el-form-item>
            <el-form-item label="该患者本次住院跌倒/坠床第次" prop="bedNumberFalls">
              <el-radio-group v-model="basicForm.bedNumberFalls" onclick="return false" >
                <el-radio label="01">第1次</el-radio>
                <el-radio label="02">第2次</el-radio>
                <el-radio label="03">第3次</el-radio>
                <el-radio label="04">>3次</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="意识情况" prop="bedAwarenessSituation" >
              <el-radio-group v-model="basicForm.bedAwarenessSituation" onclick="return false" >
                <el-radio label="01">清楚</el-radio>
                <el-radio label="02">意识障碍</el-radio>
                <el-radio label="03">定向力障碍</el-radio>
                <el-radio label="04">躁动</el-radio>
                <el-radio label="05">半昏迷状态</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="骨骼与肌肉" prop="bedBonesMuscles" >
              <el-radio-group v-model="basicForm.bedBonesMuscles" onclick="return false" >
                <el-radio label="01">正常</el-radio>
                <el-radio label="02">关节病变</el-radio>
                <el-radio label="03">四肢无力</el-radio>
                <el-radio label="04">偏瘫</el-radio>
                <el-radio label="05">运动失调</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="使用药物" >
              <div>
                <dict-tag style="font-size: 15px;color: #dd524d;font-weight: bold" :options="dict.type.he_use_of_medications" :value="basicForm.bedUseMedications"/>
              </div>
            </el-form-item>
            <el-form-item label="睡眠情况" prop="bedSleepConditions">
              <el-radio-group v-model="basicForm.bedSleepConditions" onclick="return false" >
                <el-radio label="01">好</el-radio>
                <el-radio label="02">间断入睡</el-radio>
                <el-radio label="03">失眠</el-radio>
                <el-radio label="04">服镇静药</el-radio>
                <el-radio label="05">其他</el-radio>
              </el-radio-group>
            </el-form-item>
            <div v-show="basicForm.bedSleepConditions== '其他'">
              <el-form-item label="其他" style="width: 600px" prop="bedSleepConditions">
                <el-input  v-model="basicForm.bedSleepConditions" onclick="return false" ></el-input>
              </el-form-item>
            </div>
            <el-form-item label="排泄情况" prop="bedExcretion">
              <el-radio-group v-model="basicForm.bedExcretion" onclick="return false" >
                <el-radio label="01">正常</el-radio>
                <el-radio label="02">腹泻</el-radio>
                <el-radio label="03">尿频</el-radio>
                <el-radio label="04">大小便失禁</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="其他" prop="bedOther">
              <el-radio-group v-model="basicForm.bedOther" onclick="return false" >
                <el-radio label="01">虚弱</el-radio>
                <el-radio label="02">Hb<100g/L</el-radio>
                <el-radio label="03">体位性低血压</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="跌倒/坠床前有无跌倒评估" prop="bedFallAssessment">
              <el-radio-group v-model="basicForm.bedFallAssessment" onclick="return false" >
                <el-radio label="01">是</el-radio>
                <el-radio label="02">否</el-radio>
              </el-radio-group>
            </el-form-item>
            <div style="color:blue;margin-top: 1%;font-size: 14px">跌倒/坠床环境因素:
            </div>
            <el-form-item label="床栏使用情况" prop="bedRailsCondition" >
              <el-radio-group v-model="basicForm.bedRailsCondition" onclick="return false" >
                <el-radio label="01">未使用</el-radio>
                <el-radio label="02">使用</el-radio>
                <el-radio label="03">与床栏无关</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="室内亮度" prop="bedIndoorBrightness" >
              <el-radio-group v-model="basicForm.bedIndoorBrightness" onclick="return false" >
                <el-radio label="01">明亮</el-radio>
                <el-radio label="02">暗</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="呼叫器使用">
              <el-radio-group v-model="basicForm.bedPagerUse" onclick="return false" >
                <el-radio label="01">手可取用</el-radio>
                <el-radio label="02">不能取用</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="约束带使用">
              <el-radio-group v-model="basicForm.bedRestraintBandUse" onclick="return false" >
                <el-radio label="01">无</el-radio>
                <el-radio label="02">双手约束</el-radio>
                <el-radio label="03">双足约束</el-radio>
                <el-radio label="04">四肢约束</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="伤害程度" prop="bedDegreeDamage">
              <el-radio-group v-model="basicForm.bedDegreeDamage" onclick="return false" >
                <el-radio label="01">无伤害（0级）</el-radio>
                <el-radio label="02">轻度伤害（1级）</el-radio>
                <el-radio label="03">中度伤害（2级）</el-radio>
                <el-radio label="04">重度伤害（3级）</el-radio>
                <el-radio label="05">死亡</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="跌倒主要原因" prop="bedReasonsFalling">
              <el-checkbox-group v-model="yuanyin" onclick="return false" >
                <el-checkbox label="01">因患者健康状况而造成</el-checkbox>
                <el-checkbox label="02">因治疗、药物和（或）麻醉反应而造成</el-checkbox>
                <el-checkbox label="03">因环境中危险因子而造成</el-checkbox>
                <el-checkbox label="04">因其他因素而造成</el-checkbox>
              </el-checkbox-group>
            </el-form-item>
            <el-form-item label="跌倒/坠床后处置" prop="bedFallDisposal" >
              <el-checkbox-group v-model="chuli" onclick="return false" >
                <el-checkbox label="01">无</el-checkbox>
                <el-checkbox label="02">涂药</el-checkbox>
                <el-checkbox label="03">缝合</el-checkbox>
                <el-checkbox label="04">影像学检查</el-checkbox>、
                <el-checkbox label="05">打石膏</el-checkbox>
                <el-checkbox label="06">牵引</el-checkbox>
                <el-checkbox label="07">手术</el-checkbox>
                <el-checkbox label="08">其他</el-checkbox>
              </el-checkbox-group>
            </el-form-item>

          </el-form>

        </div>
      </div>

      <!--事件情况描述-->
      <div style="width: 100%">
        <div class="bname" ref="block3" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">事件情况描述</div>
        <!--        <div style="color:blue;margin-top: 1%;font-size: 14px">怀疑药品</div>-->
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="reportForm" :model="reportForm"   label-width="140px">
            <el-form-item label="事件描述或事件经过"  style="width: 600px" prop="situationEdescriptionProcess">
              <el-input type="textarea" :rows="5" v-model="reportForm.situationEdescriptionProcess" resize="none" placeholder="请输入内容" :readonly="true"></el-input>
            </el-form-item>
            <el-form-item label="事件发生时是否采取处理措施" prop="situationMeasuresEvent">
              <el-radio-group v-model="reportForm.situationMeasuresEvent" onclick="return false" >
                <el-radio label="01">是</el-radio>
                <el-radio label="02">否</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="采取的处理措施" prop="situationTakenMeasures" >
              <el-input type="textarea" :rows="5" v-model="reportForm.situationTakenMeasures" resize="none" placeholder="请输入内容" :readonly="true"></el-input>
            </el-form-item>

          </el-form>

        </div>
      </div>

      <!--患者资料-->
      <div style="width: 100%">
        <div class="bname" ref="block4" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">患者资料
        </div>
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="reportForm" :model="reportForm"  label-width="140px">
            <el-form-item label="是否涉及患者" prop="patientInvolved">
              <el-radio-group v-model="reportForm.patientInvolved" onclick="return false" >
                <el-radio label="01">是</el-radio>
                <el-radio label="02">否</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="诊断类别" prop="patientDiagnosisCategory">
              <el-radio-group v-model="reportForm.patientDiagnosisCategory" onclick="return false" >
                <el-radio label="01">急诊</el-radio>
                <el-radio label="02">门诊</el-radio>
                <el-radio label="03">住院</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="病历号/门诊号" style="width: 600px" prop="patientRecordOutpatient">
              <el-input v-model="reportForm.patientRecordOutpatient" :readonly="true"></el-input>
            </el-form-item>
            <el-form-item label="姓名" style="width: 600px" prop="patientName">
              <el-input v-model="reportForm.patientName" :readonly="true"></el-input>
            </el-form-item>
            <el-form-item label="性别" prop="patientGender">
              <el-radio-group v-model="reportForm.patientGender" onclick="return false" >
                <el-radio label="01">男</el-radio>
                <el-radio label="02">女</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="出生日期" prop="patientDateOfBirth">
              <el-date-picker
                v-model="reportForm.patientDateOfBirth"
                type="date"
                placeholder="选择日期"
                :disabled="true">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="年龄" style="width: 600px" prop="patientAge" >
              <el-input v-model="reportForm.patientAge" :readonly="true"></el-input>
            </el-form-item>
<!--            <el-form-item label=" ">-->
<!--              <el-radio-group v-model="reportForm.patientAgeStage">-->
<!--                <el-radio label="岁"></el-radio>-->
<!--                <el-radio label="月"></el-radio>-->
<!--                <el-radio label="天"></el-radio>-->
<!--                <el-radio label="小时"></el-radio>-->
<!--              </el-radio-group>-->
<!--            </el-form-item>-->
            <el-form-item label="年龄阶段" prop="patientAgeStage">
              <el-select disabled v-model="reportForm.patientAgeStage" placeholder="请选择" filterable :readonly="true">
                <el-option
                  v-for="item in dict.type.he_patient_age_grades"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="家属联系电话" style="width: 600px" prop="patientFamilyNumber" >
              <el-input v-model="reportForm.patientFamilyNumber" :readonly="true"></el-input>
            </el-form-item>
            <el-form-item label="入院就诊时间" prop="patientAdmissionTime" >
              <el-date-picker
                v-model="reportForm.patientAdmissionTime"
                type="datetime"
                placeholder="选择日期时间"
                :readonly="true">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="床号" style="width: 600px" prop="patientBedNumber" >
              <el-input v-model="reportForm.patientBedNumber" :readonly="true"></el-input>
            </el-form-item>
            <el-form-item label="护理级别" prop="patientNursingLevel"  >
              <el-radio-group v-model="reportForm.patientNursingLevel" onclick="return false">
                <el-radio label="01">特级护理</el-radio>
                <el-radio label="02">Ⅰ级护理</el-radio>
                <el-radio label="03">Ⅱ级护理</el-radio>
                <el-radio label="04">Ⅲ级护理</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="文化程度" prop="patientEducationLevel"  >
              <el-radio-group v-model="reportForm.patientEducationLevel" onclick="return false">
                <el-radio label="01">研究生</el-radio>
                <el-radio label="02">大学本科</el-radio>
                <el-radio label="03">大学专科</el-radio>
                <el-radio label="04">中专（中技）</el-radio>
                <el-radio label="05">高中</el-radio>
                <el-radio label="06">初中</el-radio>
                <el-radio label="07">小学</el-radio>
                <el-radio label="08">文盲</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="诊断(多个诊断之间用逗号隔开)" style="width: 600px" prop="patientDiagnosis">
              <el-input type="textarea" :rows="5" v-model="reportForm.patientDiagnosis" resize="none" placeholder="请输入内容" :readonly="true"></el-input>
            </el-form-item>
          </el-form>
        </div>
      </div>

<!--      &lt;!&ndash;其他情况这一块数据库里没有字段所以先在前端写死&ndash;&gt;-->
<!--      <div style="width: 100%; margin-left: 8%; margin-top:1%">-->
<!--        <div class="bname" ref="block5" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">其他情况</div>-->
<!--        <div class="block" style="margin-top: 0.5%;">-->
<!--          <el-form ref="reportForm" :model="reportForm" label-width="140px">-->
<!--            <el-form-item label="立即通知">-->
<!--                <el-checkbox label="护士长"></el-checkbox>-->
<!--                <el-checkbox label="主管医生"></el-checkbox>-->
<!--                <el-checkbox label="值班医生"></el-checkbox>-->
<!--                <el-checkbox label="上级主管部门"></el-checkbox>-->
<!--                <el-checkbox label="保卫科"></el-checkbox>-->
<!--                <el-checkbox label="病人家属及陪护"></el-checkbox>-->
<!--                <el-checkbox label="其他"></el-checkbox>-->
<!--            </el-form-item>-->
<!--            <el-form-item label="病人/家属对该事件反应" >-->
<!--                <el-radio label="不知情"></el-radio>-->
<!--                <el-radio label="知情能理解"></el-radio>-->
<!--                <el-radio label="知情无法理解"></el-radio>-->
<!--                <el-radio label="知情反应不详"></el-radio>-->
<!--                <el-radio label="其他"></el-radio>-->
<!--            </el-form-item>-->
<!--          </el-form>-->
<!--        </div>-->

<!--      </div>-->



      <!--事件基本信息-->
      <div style="width: 100%">
        <div class="bname" ref="block6" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">事件基本信息</div>
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="reportForm" :model="reportForm"  label-width="140px">
            <el-form-item label="发生时间" prop="occurrenceTime">
              <el-date-picker
                v-model="reportForm.occurrenceTime"
                type="datetime"
                placeholder="选择日期时间"
                :readonly="true">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="发生日期" prop="occurrenceDate">
              <el-date-picker
                v-model="reportForm.occurrenceDate"
                type="date"
                placeholder="选择日期时间"
                :readonly="true">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="日期类型" prop="occurrenceDateType">
              <el-radio-group v-model="reportForm.occurrenceDateType" onclick="return false">
                <el-radio label="工作日"></el-radio>
                <el-radio label="周末"></el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="发生时段" prop="occurrenceTimePeriod">
              <el-radio-group v-model="reportForm.occurrenceTimePeriod" onclick="return false">
                <el-radio label="01">上午(08：00-12：00)</el-radio>
                <el-radio label="02">中午(12：00-14：00)</el-radio>
                <el-radio label="03">下午(14：00-18：00)</el-radio>
                <el-radio label="04">上夜(18：00-00：00)</el-radio>
                <el-radio label="05">下夜(00：00-08：00)</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="发生地点" style="width: 600px" prop="occurrenceLocation">
              <el-input v-model="reportForm.occurrenceLocation" :readonly="true"></el-input>
            </el-form-item>
            <!--上传图片-->
            <el-form-item label="现场照片" prop="occurrenceScenePhotos">
              <image-upload :limit="1" v-model="reportForm.occurrenceScenePhotos"  :readonly="true" />
            </el-form-item>
            <!--          <el-form-item label="事件发生时是否采取处理措施" :rules="[{required: true, message: '事件发生时是否采取处理措施未选择'}]">-->
            <!--            <el-radio-group v-model="form.medicineType">-->
            <!--              <el-radio label="是"></el-radio>-->
            <!--              <el-radio label="否"></el-radio>-->
            <!--            </el-radio-group>-->
            <!--          </el-form-item>-->
            <!--          <el-form-item label="采取的处理措施" >-->
            <!--            <el-input type="textarea" :rows="5" v-model="form.approvalNum" resize="none" placeholder="请输入内容"></el-input>-->
            <!--          </el-form-item>-->
          </el-form>
        </div>
      </div>

      <!--当事人资料-->
      <div style="width: 100%">
        <div class="bname" ref="block7" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">当事人资料</div>
        <!--        <div style="color:blue;margin-top: 1%;font-size: 14px">怀疑药品</div>-->
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="reportForm" :model="reportForm"  label-width="140px">
            <el-form-item label="姓名" style="width: 600px" prop="partyName">
              <el-input  v-model="reportForm.partyName" :readonly="true" ></el-input>
            </el-form-item>
            <el-form-item label="年龄" style="width: 600px" prop="partyAge" >
              <el-input  v-model="reportForm.partyAge" :readonly="true" ></el-input>
            </el-form-item>
            <el-form-item label="工作年限" prop="partyYearsOfExperience" >
              <el-radio-group v-model="reportForm.partyYearsOfExperience" onclick="return false">
                <el-radio label="01"><1年</el-radio>
                <el-radio label="02">1≤y≤2</el-radio>
                <el-radio label="03">2≤y≤5</el-radio>
                <el-radio label="04">5≤y≤10</el-radio>
                <el-radio label="05">10≤y≤20</el-radio>
                <el-radio label="06">≥20年</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="类别" prop="partyCategory" >
              <el-radio-group v-model="reportForm.partyCategory" onclick="return false">
                <el-radio label="01">在编</el-radio>
                <el-radio label="02">聘用</el-radio>
                <el-radio label="03">进修</el-radio>
                <el-radio label="04">实习</el-radio>
                <el-radio label="05">轮转</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="学历" prop="partyEducation">
              <el-radio-group v-model="reportForm.partyEducation" onclick="return false">
                <el-radio label="01">中专</el-radio>
                <el-radio label="02">大专</el-radio>
                <el-radio label="03">本科</el-radio>
                <el-radio label="04">硕士</el-radio>
                <el-radio label="05">其他</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="职务" prop="partyPosition" >
              <el-radio-group v-model="reportForm.partyPosition" onclick="return false">
                <el-radio label="01">医疗</el-radio>
                <el-radio label="02">药剂</el-radio>
                <el-radio label="03">护理</el-radio>
                <el-radio label="04">医技</el-radio>
                <el-radio label="05">检验</el-radio>
                <el-radio label="06">工程技术</el-radio>
                <el-radio label="07">行政管理</el-radio>
                <el-radio label="08">后勤保障</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-form>
        </div>
      </div>

      <!--事件结果-->
      <div style="width: 100%">
        <div class="bname" ref="block8" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">事件结果</div>
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="reportForm" :model="reportForm"  label-width="140px">
            <el-form-item label="纠纷或纠纷隐患可能性" prop="resultsPossibilityDispute">
              <el-radio-group v-model="reportForm.resultsPossibilityDispute" onclick="return false">
                <el-radio label="01">确定有</el-radio>
                <el-radio label="02">可能有</el-radio>
                <el-radio label="03">无</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="事件严重程度" prop="resultsEventSeverity">
              <div>
                <dict-tag style="font-size: 15px;color: #dd524d;font-weight: bold" :options="dict.type.he_event_severity" :value="reportForm.resultsEventSeverity"/>
              </div>
            </el-form-item>
            <el-form-item label="事件分级" style="width: 600px" prop="resultsEventClassification">
              <el-radio-group v-model="reportForm.resultsEventClassification" onclick="return false">
                <el-radio label="01" style="margin-top: 10px; margin-bottom: 10px">Ⅰ级事件: 发生错误，造成患者死亡 (包括损害程度I级)</el-radio>
                <el-radio label="02" style="margin-bottom: 10px">Ⅱ级事件: 发生错误，且造成患者伤害 (包括损害程度E、F、G、H级)</el-radio>
                <el-radio label="03" style="margin-bottom: 10px">Ⅲ级事件: 发生错误，但未造成患者伤害 (包括损害程度B、C、D级)</el-radio>
                <el-radio label="04">Ⅳ级事件: 错误未发生 (错误隐患)(包括损害程度A级)</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="伤害严重度" prop="resultsSeverityInjury">
              <el-radio-group v-model="reportForm.resultsSeverityInjury" onclick="return false">
                <el-radio label="01">死亡</el-radio>
                <el-radio label="02">极度严重</el-radio>
                <el-radio label="03">重度</el-radio>
                <el-radio label="04">中度</el-radio>
                <el-radio label="05">轻度</el-radio>
                <el-radio label="06">未造成伤害</el-radio>
                <el-radio label="07">无伤害</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-form>
        </div>

      </div>



      <!--  报告者信息-->
      <div style="width: 100%">
        <div class="bname" ref="block9" style="border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">报告者信息</div>
        <div class="block" style="margin-top: 0.5%;">
          <el-form ref="reportForm" :model="reportForm" label-width="140px">
            <el-form-item label="事件呈报方式" prop="reportMethod">
              <el-radio-group v-model="reportForm.reportMethod" onclick="return false">
                <el-radio label="01">主动呈报</el-radio>
                <el-radio label="02">投诉</el-radio>
                <el-radio label="03">他人报告</el-radio>
                <el-radio label="04">质量检查发现</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="其他信息备注"  style="width: 600px" prop="reportAttachedImages">
              <el-input type="textarea" :rows="5" v-model="reportForm.reportOtherRemarks" resize="none" placeholder="请输入内容" :readonly="true"></el-input>
            </el-form-item>
            <!--上传图片-->
            <el-form-item label="附件图片" prop="images">
              <image-upload :limit="1" v-model="reportForm.reportAttachedImages"  :readonly="true" />
            </el-form-item>
          </el-form>
        </div>
      </div>
    </div>
  </div>
</template>


<script>
import ScrollPane from "@/layout/components/TagsView/ScrollPane";
import { addBasic,getBasic } from "@/api/module/shao/shijian/basic";
export default {
  components: {ScrollPane},
  dicts: ['he_use_of_medications','he_event_severity','he_discussion_qualitative_levels','he_measure_strengthen_communication','he_measure_improve_administration','he_measure_care_management','he_measure_strengthen_education','he_possible_causes_environment','he_possible_causes_process_system','he_possible_causes_consumable_drug','he_possible_causes_equipment','he_discussion_medical_malpractice','he_discussion_involves_patient','he_education', 'he_patient_gender', 'he_party_post', 'he_report_event_state', 'he_report_event_type', 'he_patient_age_grades', 'he_event_severity', 'he_review_status', 'he_report_status', 'he_position', 'he_event_classification', 'he_review_event_type', 'he_possibility_of_dispute', 'he_patient_involved', 'he_analyze_reports', 'he_fallback_status', 'he_occurrence_time_period', 'he_event_determinatione', 'he_situation_measures_event', 'he_patient_education_level', 'he_diagnosis_category', 'he_years_of_experience', 'he_severity_of_injury', 'he_reporting_method', 'he_patient_nursing_level', 'he_date_type', 'he_invalidation_status', 'he_patient_ethnic_group', 'he_category', 'he_handling_status','he_possible_causes_workers','he_possible_causes_patient','he_possible_causes_family'],
  data() {
    return {
      //多选框中的值
      yuanyin:[],
      chuli:[],
      checkList:[],
      formEvent:{
        //代表是事件基本信息表
        heEventBasic: {},
        //代表事件上传信息表
        heEventReport: {},
        //代表事件流程表
        heEventFlow:{},
      },
      //代表事件基本信息表
      basicForm:{
        //这个就是新增到事件基本信息表的坠床事件
        bedTemperature: '',
        bedPulse: '',
        bedBreathe: '',
        bedBloodPressure: '',
        bedConsciousnessState: '',
        bedDamageCaused: '',
        bedPlace: '',
        bedArea: '',
        bedDropLocation: '',
        bedMobility: '',
        bedTreatmentConditions: '',
        bedFamilyEscorts: '',
        bedActivityProcess: '',
        bedAnamnesis: '',
        bedNumberFalls: '',
        bedAwarenessSituation: '',
        bedBonesMuscles: '',
        bedUseMedications: '',
        bedSleepConditions: '',
        bedExcretion: '',
        bedOther: '',
        bedFallAssessment: '',
        bedAssessmentTools: '',
        bedEvaluationLevel: '',
        bedEvaluationTime: '',
        bedRailsCondition: '',
        bedIndoorBrightness: '',
        bedPagerUse: '',
        bedRestraintBandUse: '',
        bedDegreeDamage: '',
        bedReasonsFalling: '',
        bedFallDisposal: '',
      },
      //代表事件上报信息表
      reportForm:{
        reportEventType:'02',
        reviewEventType:'01',
        //以下都是新增到事件上传信息表的字段
        //事件情况描述
        situationEdescriptionProcess: '',
        situationMeasuresEvent: '',
        situationTakenMeasures: '',
        situationCausesconsequences: '',
        //患者资料
        patientInvolved: '',
        patientDiagnosisCategory: '',
        patientRecordOutpatient: '',
        patientName: '',
        patientGender: '',
        patientDateOfBirth: '',
        patientAge: '',
        patientAgeStage: '',
        patientEthnicGroup: '',
        patientWeight: '',
        patientPreDisease: '',
        patientContact: '',
        patientFamilyNumber: '',
        patientAdmissionTime: '',
        patientDepartment: '',
        patientBedNumber: '',
        patientNursingLevel: '',
        patientEducationLevel: '',
        patientDiagnosis: '',
        //其他情况暂时没有字段以后加这里先写死
        //事件基本信息
        occurrenceTime: '',
        occurrenceDate: '',
        occurrenceDateType: '',
        occurrenceTimePeriod: '',
        occurrenceLocation: '',
        occurrenceScenePhotos: '',
        //当事人资料
        partyName: '',
        partyAge: '',
        partyYearsOfExperience: '',
        partyCategory: '',
        partyEducation: '',
        partyPosition: '',
        partyPost: '',
        //事件结果
        resultsPossibilityDispute: '',
        resultsEventSeverity: '',
        resultsEventClassification: '',
        resultsSeverityInjury: '',
        //报告者信息(上报信息)
        reportMethod: '',
        reportAttachedImages: '',
        reportOtherRemarks: '',
        reportDepartment:'',
        note1:'',
      },
      //代表事件流程表
      flowForm:{},
      boxlist:[]
    }
  },
  // 禁止web端屏幕缩放
  created() {
    //获取上一个页面传过来的id
    const id = this.$route.query.id;
    //通过id查询
    getBasic(id).then(response => {
      //获取后台传过来的表单
      this.formEvent = response.data;
      //将其对应赋值进行表单渲染
      this.basicForm=this.formEvent.heEventBasic
      this.reportForm=this.formEvent.heEventReport
      //用于多选框反显
      if (this.basicForm.bedTreatmentConditions!=null){
        this.checkList=this.pushCheckbox(this.basicForm.bedTreatmentConditions)
      }
      if (this.basicForm.bedReasonsFalling!=null){
        this.yuanyin=this.pushCheckbox(this.basicForm.bedReasonsFalling)
      }
      if (this.basicForm.bedFallDisposal!=null){
        this.chuli=this.pushCheckbox(this.basicForm.bedFallDisposal)
      }
    });
  },
  methods: {
    //用于多选框反显
    pushCheckbox(str){
      if(str==null){
        console.log("未到这")
      }else {
        const boxlist=str.split(",");
        return boxlist;
      }

    },
    //保存按钮事件
    baocun(){
      this.$refs["basicform"].validate(valid => {
        if (valid) {
          //这个this.basicForm.bedAnamnesis是一个数组然后需要把数组对象切割成字符串再拼接
          this.basicForm.bedAnamnesis=this.popCheckbox(this.basicForm.bedAnamnesis);
          this.reportForm.note1="坠床事件"
          //将代表事件上报信息表的字段内容赋值给heEventReport对象用于连接后台
          this.formEvent.heEventReport=this.reportForm
          //将代表事件基本信息表的字段内容赋值给heEventReport对象用于连接后台
          this.formEvent.heEventBasic=this.basicForm
          //将代表事件基本信息表的字段内容赋值给heEventReport对象用于连接后台
          this.formEvent.heEventFlow=this.flowForm
          addBasic(this.formEvent).then(response => {
            this.$modal.msgSuccess("新增成功");
          });
        }
      });
    },
    //el 标签  speed 滚动速率 此处是50px 值越大滚动的越快
    goAssignBlock(el, speed) {
      let t = this.$refs[el].offsetTop - 100

      function scrollToTop() {
        let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;

        if (scrollTop > t) {
          window.scrollTo(0, scrollTop - speed);

          // 使用 requestAnimationFrame 进行平滑滚动
          requestId = window.requestAnimationFrame(scrollToTop);
        } else {
          window.scrollTo(0, t);

          // 取消动画帧的请求
          window.cancelAnimationFrame(requestId);
        }
      }

      let requestId = window.requestAnimationFrame(scrollToTop);
    },

    //上传图片
    handleRemove(file) {
      this.fileList = this.fileList.filter(item => item.uid !== file.uid);
    },
    handleExceed() {
      this.msgError("最多只能传500张照片");
    },
    beforeUpload(file) {
      const isJPG = file.type === "image/jpeg" || file.type == "image/png";
      const isLt2M = file.size / 1024 / 1024 < 2;
      if (!isJPG) {
        this.$message.error("上传头像图片只能是 JPG 或 PNG 格式!");
        return;
      }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
        return;
      }
      const fileData = new FormData();
      fileData.append("avatar", file);
      //upload为上传的接口
      upload(fileData).then(res => {
        this.imgUrl = res.imgUrl;
        //对返回的图片地址进行回显
        this.$set(this.form, "avatar", this.imgUrl);
      });
      //阻止传到本地浏览器
      return false;
    },

  },

}

</script>

<style lang="scss" scoped>
  @import "src/views/module/shao/blackFont";

  .sidebar {
  margin-left: 3%;
  width: 10%;
  float: left;
  display: flex;
}

.content {
  width: 87%;
}

.btn-box {
  position: fixed;
  margin-top: 1%;

  ::v-deep .el-card__body {
    padding: 15px 15px 15px 5px;
  }
}

.btn-box button {
  text-align: left;
  padding: 0 0 0 10px;
  display: block;
  width: 150px;
  height: 40px;
  border: none;
  cursor: pointer;
}

.btn-box button:hover {
  background: hsl(221, 98%, 68%);
  color: white;
}

.block {
  border: 1px solid white;
  width: 100%;
  height: 100%;
  display: flex;
  font-size: 5rem;
  box-sizing: border-box;

  .el-form-item {
    margin-bottom: 10px;
  }
}

.bname {
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  font-weight: bold;
  font-size: 20px;
  color: black;
}

</style>
